/****************************************************************************
* MINILOGO - Minimalistic Logo Interpreter
* Copyright (C) 1999-2008 Willian Mitsuda
* 
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
* 
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
* GNU General Public License for more details.
* 
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
* 
*****************************************************************************

*****************************************************************************
* CMDTAB.H                                                                  *
*****************************************************************************
* Este arquivo contem somente a tabela de definicoes de comandos que eh     *
* armazenada no array de estruturas "static cmd_descr cmds[]" e o numero de *
* entradas nessa tabela que eh armazenado na variavel "static int cmdcount" *
* alem dos prototipos das funcoes tratadoras de comandos, eh claro.         *
* As funcoes tratadoras devem ter o seguinte prototipo:                     *
*   "cmd_stat nome-da-funcao(char *[]);"                                    *
* Este arquivo eh incluido somente por "shell.c".                           *
* NENHUMA INFORMACAO ADICIONAL DEVE SER COLOCADA NESTE ARQUIVO.             *
****************************************************************************/

// Os prototipos das funcoes tratadoras de comandos
cmd_stat pf(char *[]);
cmd_stat pt(char *[]);
cmd_stat pd(char *[]);
cmd_stat pe(char *[]);
cmd_stat pc(char *[]);
cmd_stat mudex(char *[]);
cmd_stat mudey(char *[]);
cmd_stat mudexy(char *[]);
cmd_stat repita(char *[]);
cmd_stat ad(char *[]);
cmd_stat att(char *[]);
cmd_stat tat(char *[]);
cmd_stat at(char *[]);
cmd_stat dt(char *[]);
cmd_stat estt(char *[]);
cmd_stat mudecl(char *[]);
cmd_stat mudecb(char *[]);
cmd_stat ul(char *[]);
cmd_stat ub(char *[]);
cmd_stat un(char *[]);
cmd_stat mostrex(char *[]);
cmd_stat mostrey(char *[]);
cmd_stat mostrexy(char *[]);
cmd_stat mostrexlim(char *[]);
cmd_stat mostreylim(char *[]);
cmd_stat mostrexylim(char *[]);
cmd_stat mostredir(char *[]);
cmd_stat mostreest(char *[]);
cmd_stat mostrecl(char *[]);
cmd_stat mostrecb(char *[]);
cmd_stat sair(char *[]);
cmd_stat ajuda(char *[]);
cmd_stat demo(char *[]);
cmd_stat sobre(char *[]);

// Tabela de comandos
static cmd_descr cmds[] = {{"pf", &pf, 1, {A_inteiro}},
                           {"parafrente", &pf, 1, {A_inteiro}},
                           {"pt", &pt, 1, {A_inteiro}},
                           {"paratras", &pt, 1, {A_inteiro}},
                           {"pd", &pd, 1, {A_inteiro}},
                           {"paradireita", &pd, 1, {A_inteiro}},
                           {"pe", &pe, 1, {A_inteiro}},
                           {"paraesquerda", &pe, 1, {A_inteiro}},
                           {"pc", &pc, 0, {}},
                           {"paracentro", &pc, 0, {}},
                           {"mudex", &mudex, 1, {A_inteiro}},
                           {"mudey", &mudey, 1, {A_inteiro}},
                           {"mudexy", &mudexy, 2, {A_inteiro, A_inteiro}},
                           {"repita", &repita, 2, {A_inteiro, A_bloco}},
                           {"ad", &ad, 0, {}},
                           {"apaguedesenho", &ad, 0, {}},
                           {"att", &att, 0, {}},
                           {"apaguetexto", &att, 0, {}},
                           {"tat", &tat, 0, {}},
                           {"tartaruga", &tat, 0, {}},
                           {"at", &at, 0, {}},
                           {"aparecatat", &at, 0, {}},
                           {"dt", &dt, 0, {}},
                           {"desaparecatat", &dt, 0, {}},
                           {"estt", &estt, 1, {A_inteiro}},
                           {"estilotat", &estt, 1, {A_inteiro}},
                           {"mudecl", &mudecl, 1, {A_inteiro}},
                           {"mudecb", &mudecb, 1, {A_inteiro}},
                           {"ul", &ul, 0, {}},
                           {"uselapis", &ul, 0, {}},
                           {"ub", &ub, 0, {}},
                           {"useborracha", &ub, 0, {}},
                           {"un", &un, 0, {}},
                           {"usenada", &un, 0, {}},
                           {"mostrex", &mostrex, 0, {}},
                           {"mostrey", &mostrey, 0, {}},
                           {"mostrexy", &mostrexy, 0, {}},
                           {"mostrexlim", &mostrexlim, 0, {}},
                           {"mostreylim", &mostreylim, 0, {}},
                           {"mostrexylim", &mostrexylim, 0, {}},
                           {"mostredir", &mostredir, 0, {}},
                           {"mostreest", &mostreest, 0, {}},
                           {"mostrecl", &mostrecl, 0, {}},
                           {"mostrecb", &mostrecb, 0, {}},
                           {"sair", &sair, 0, {}},
                           {"ajuda", &ajuda, 1, {A_comando}},
                           {"demo", &demo, 0, {}},
                           {"sobre", &sobre, 0, {}}};

// Numero de entradas do array cmds[]
static int cmdcount = 48;
